package com.tanhua.model.vo;

import com.tanhua.model.domain.Options;
import com.tanhua.model.domain.Questionnaire;
import com.tanhua.model.domain.Questions;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * @author pc
 * @date 2021/11/27
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OptionsVo {

    String id;//选项编号
    String option;//选项

    public static OptionsVo init(Options options) {
        OptionsVo vo = new OptionsVo();
        BeanUtils.copyProperties(options, vo);
        vo.setOption(options.getOptions());
        vo.setId(options.getId().toString());
        return vo;
    }
}